/****************** Exercise 7 ******************
 * Turn the Incrementable code fragments into a
 * working program.
 ************************************************/

package thinkinginjava.everything_is_an_object;

class StaticTest{
    static int i = 47;
}

class Incrementable {
    static void increment(){
        StaticTest.i++;
    }
}


/**
 *
 * @author vlad
 */
public class Exercise7 {
    public static void main(String[] args){
        System.out.println("StaticTest.i = " + StaticTest.i);
        Incrementable.increment();
        System.out.println("StaticTest.i = " + StaticTest.i);
        Incrementable inc = new Incrementable();
        inc.increment();
        System.out.println("StaticTest.i = " + StaticTest.i);
    }
}
